
//textbox组件
require(['garenjs/utils','garenjs/htmlui','garenjs/easyui'],function(utils,garenUI,easyUI){
	
	easyUI.regFn({
	   name:'textbox',
	   tag:'input',
	   onBeforeCreate:function(uiOpts){//回调函数
		   var jqDom = $(this);
		   var clearFlag = uiOpts.clearFlag || $.fn.textbox.defaults.clearFlag;
		   if(clearFlag){
			   uiOpts.icons = uiOpts.icons || [];
			   uiOpts.icons.push({
				   iconCls:'icon-clear',
				   handler: function(e){
						$(e.data.target).textbox('clear');
				   }
			   });
		   }
	   }
	});
	$.extend($.fn.textbox.defaults, {
		clearFlag:false
	});
});


